package com.cupk2.lucene;

import com.cupk2.lucene.inter.Cupk2LuceneIndexInter;
import com.cupk2.lucene.inter.Cupk2LuceneSearchInter;
import com.cupk2.lucene.utils.CupkLuceneUtils;
import com.cupk2.lucene.impl.Cupk2LuceneIndexImpl;
import com.cupk2.lucene.impl.Cupk2LuceneSearchImpl;

public class Cupk2LuceneFace {

    public static Cupk2LuceneIndexInter getIndexService() {
        return new Cupk2LuceneIndexImpl(CupkLuceneUtils.getLuceneIndexFilePath());
    }

    public static Cupk2LuceneIndexInter getIndexService(String path) {
        return new Cupk2LuceneIndexImpl(path);
    }


    public static Cupk2LuceneSearchInter getSearchService() {
        return new Cupk2LuceneSearchImpl(CupkLuceneUtils.getLuceneIndexFilePath());
    }


    public static Cupk2LuceneSearchInter getSearchService(String path) {
        return new Cupk2LuceneSearchImpl(path);
    }
}
